﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Option_Look.aspx.cs" Inherits="MsgCenter.Web.Pages.User.Option_Look"
    MasterPageFile="~/Option.Master" %>

<asp:Content ID="Content1" ContentPlaceHolderID="headContent" runat="server">
    <link rel="stylesheet" media="screen" type="text/css" href="<%=ResolveClientUrl("~/JavaScript/Tree/tree.css") %>" />
    <script type="text/javascript" src="<%=ResolveClientUrl("~/JavaScript/Tree/tree.js") %>"></script>
    <script type="text/javascript">
        var ajaxUrl = "../../Handlers/Handler_User.ashx";
        var hidUserID_ID = "<%=strGuID %>";
        window.onload = function () {
            CreateTree();
        }

        function CreateTree() {
            window.setTimeout(LoadSetTree, 100);            
        }

        function LoadSetTree() {
            var UserID = hidUserID_ID;
            var o = {
                cbiconpath: "../../images/tree/",
                emptyiconpath: "../../images/tree/s.gif",
                showcheck: true,
                onnodeclick: null
            };
            $.ajax({
                type: "GET",
                url: ajaxUrl + "?method=CreateUserAuth&UserID=" + UserID + "",
                data: "rnd=" + Math.random(),
                async: false,
                success: function (msg) {
                    eval("var data =" + msg + ";");
                    o.data = data;
                    $("#tree").treeview(o);
                },
                error: function (msg) {
                    alert("获取数据出现错误:" + msg);
                }
            }); 
        }
    </script>
    <style type="text/css">
        .col-sm-6{padding-left: 0px;}
    </style>
</asp:Content>
<asp:Content ID="Content2" runat="server" ContentPlaceHolderID="mailContent">
    <table width="660px" cellpadding="0" cellspacing="0">
        <tr>
            <td width="80px" align="right" height="35px">
                <font color="red">*</font>&nbsp;姓名:
            </td>
            <td width="240px" align="left">
                <input type="text" id="txtName" runat="server" class="form-control col-xs-10 col-sm-5" style="width: 200px" />
            </td>
            <td width="80px" align="left">
                <font color="red">*</font>&nbsp;所属部门:
            </td>
            <td width="240px" align="left">
                <input type="text" id="txtDeptName" runat="server"  style="width: 200px" class="form-control" />
            </td>
        </tr>
        <tr>
            <td width="80px" align="right" height="50px">
                <font color="red">*</font>&nbsp;登录名:
            </td>
            <td width="240px" align="left">
                <input type="text" id="txtUserName" runat="server" placeholder="" class="form-control col-xs-10 col-sm-5"
                    style="width: 200px" />
            </td>
            <td width="80px" align="left">
                <font color="red">*</font>&nbsp;密码:
            </td>
            <td width="240px" align="left">
                <input type="text" id="txtPassword" runat="server" placeholder="" class="form-control col-xs-10 col-sm-5"
                    style="width: 200px" />
            </td>
        </tr>
        <tr>
            <td width="80px" align="right" height="50px">
                是否管理员:
            </td>
            <td align="left">
                <input name="chkIsAdmin" id="chkIsAdmin" runat="server" class="form-control ace ace-switch ace-switch-5"
                    type="checkbox" checked="checked" />
                <span class="lbl"></span>
            </td>
            <td colspan="2" rowspan="2">
                <div class="col-sm-6" style="width: 290px; text-align: left;">
                    <div class="widget-box">
                        <div class="widget-header header-color-blue2">
                            <h4 class="lighter smaller">
                                用户权限列表</h4>
                        </div>
                        <div class="widget-body">
                            <div class="widget-main padding-8">
                                <div id="tree" style="height: 240px; overflow-x: no; overflow-y: auto;">
                                    <img src="../../Images/tree/loading.gif" />
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </td>
        </tr>
        <tr>
            <td width="80px" align="right" height="50px" valign="top">
                所属角色:
            </td>
            <td width="240px" align="left" valign="top">
                <asp:ListBox ID="listRole" runat="server" Height="250px" SelectionMode="Multiple"
                    Width="200px" CssClass="form-control"></asp:ListBox>
            </td>
        </tr>
    </table>
    <div style="text-align: center">
        <button class="btn" onclick="window.parent.CBClose();return false;">
            <i class="icon-undo bigger-110"></i>取消
        </button>
    </div>
</asp:Content>
